<template>
    <basic-container>
      <!-- START goBack -->
      <div class="el-page-header haruyuki-mb-20">
        <div class="haruyuki-page-header-left haruyuki-size-18" @click="goBack">
          <i class="el-icon-arrow-left"></i>
          <div class="haruyuki-size-16">返回</div>
        </div>
        <div class="el-page-header__content">分账订单详情</div>
      </div>
      <!-- END goBack -->
      <order-details :order-id="orderId" />
    </basic-container>
  </template>
    
  <script>
  import orderDetails from "./components/order-details";
  export default {
    name: "SeparateOrderDetails",
    components: {
      orderDetails,
    },
    data() {
      return {
        orderId: null,
      };
    },
    watch: {
      "$route.query.d": {
        handler(val) {
          if (val) {
            const param = JSON.parse(this.$crypto.decrypt(val));
            const { orderId } = param;
            this.orderId = orderId;
          }
        },
        immediate: true,
      },
    },
    methods: {
      goBack() {
        this.$router.$avueRouter.closeTag();
        this.$router.back();
      },
    },
  };
  </script>